﻿namespace Wedn.Model.Data
{
    /// <summary>
    /// 链接表模型类(初步审核通过)
    /// </summary>
    public class Link
    {
        #region 所有字段
        private int id;
        private string name;
        private string url;
        private string title;
        private string target;
        private string type;
        private int ownerId;
        private string update;
        private bool visible;
        private int order;
        private int parentId;
        #endregion

        #region 对外公共属性
        /// <summary>
        /// 主键(自增长)字段
        /// </summary>
        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        /// <summary>
        /// 链接名称字段
        /// </summary>
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        /// <summary>
        /// 链接地址字段
        /// </summary>
        public string Url
        {
            get { return url; }
            set { url = value; }
        }
        /// <summary>
        /// 链接提示文字字段
        /// </summary>
        public string Title
        {
            get { return title; }
            set { title = value; }
        }
        /// <summary>
        /// 链接目标窗口字段
        /// </summary>
        public string Target
        {
            get { return target; }
            set { target = value; }
        }
        /// <summary>
        /// 链接用途字段
        /// </summary>
        public string Type
        {
            get { return type; }
            set { type = value; }
        }
        /// <summary>
        /// 链接创建作者
        /// </summary>
        public int OwnerId
        {
            get { return ownerId; }
            set { ownerId = value; }
        }
        /// <summary>
        /// 链接更新时间字段
        /// </summary>
        public string Update
        {
            get { return update; }
            set { update = value; }
        }
        /// <summary>
        /// 链接是否可见字段
        /// </summary>
        public bool Visible
        {
            get { return visible; }
            set { visible = value; }
        }
        /// <summary>
        /// 链接排序字段
        /// </summary>
        public int Order
        {
            get { return order; }
            set { order = value; }
        }
        /// <summary>
        /// 链接描述说明字段
        /// </summary>
        public int ParentId
        {
            get { return parentId; }
            set { parentId = value; }
        }
        #endregion

        #region 构造函数
        public Link() { }
        /// <summary>
        /// 链接表模型类构造函数
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <param name="name">链接名称</param>
        /// <param name="url">链接地址</param>
        /// <param name="title">链接提示文字</param>
        /// <param name="target">链接目标窗口</param>
        /// <param name="type">链接用途</param>
        /// <param name="ownerid">链接创建者ID</param>
        /// <param name="update">链接最后更新时间</param>
        /// <param name="visible">链接是否可见</param>
        /// <param name="order">链接排序</param>
        /// <param name="parentid">链接描述说明</param>
        public Link(int id, string name, string url, string title, string target, string type, int ownerid, string update, bool visible, int order, int parentid)
        {
            this.id = id;
            this.name = name;
            this.url = url;
            this.title = title;
            this.target = target;
            this.type = type;
            this.ownerId = ownerid;
            this.update = update;
            this.visible = visible;
            this.order = order;
            this.parentId = parentid;
        } 
        #endregion
    }
}
